/* -*- C++ -*- */

//=============================================================================
/*
* @author Feloweria <380374483@qq.com>
* Copyright (C) Feloweria
*
* $ID 2014-05-14 11:24:02 AM
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details
*
* You should have received a copy of the GNU General Public License
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
*
* @version 1.0
*/
//=============================================================================
#ifndef FLOWRIA_SOCKET_MANAGER_INCLUDE
#define FLOWRIA_SOCKET_MANAGER_INCLUDE

#include "Base/Base.h"

FELOWRIA_BEGIN
class Socket;
class SocketThread;

class DLL_EXPORT SocketManager
{
private:
	SocketManager();
	~SocketManager();

public:
	SocketThread* GetFreeThread();

public:
	bool SpawnSocketThread(int32 size = 1);

public:
	static SocketManager* Instance();

private:
	SocketThread *thread_list;
	int32 thread_size;
	
private:
	static SocketManager *instance;
};

FELOWRIA_END


#endif // FLOWRIA_SOCKET_MANAGER_INCLUDE
